// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * PurchaseChangeOrder
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "purchase_change_order", autoResultMap = true)
@Schema(title = "变更单")
@RoleData2(groupId = 2, funcKey = "PurchaseChangeOrder")
public class PurchaseChangeOrder implements Serializable {

  /**
   * 变更单号
   */
  @TableField(value = "`c_order_sn`")
  @Schema(title = "变更单号")
  private String cOrderSn;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @JoinField(SysUser.class)
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 供应商
   */
  @TableField(value = "`supplier_id`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplierId;

  /**
   * 采购仓库
   */
  @TableField(value = "`wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "采购仓库")
  private Long wid;

  /**
   * 联系人
   */
  @TableField(value = "`contact_person`")
  @Schema(title = "联系人")
  private String contactPerson;

  /**
   * 联系方式
   */
  @TableField(value = "`contact_number`")
  @Schema(title = "联系方式")
  private String contactNumber;

  /**
   * 结算方式
   */
  @TableField(value = "`settlement_method`")
  @Schema(title = "结算方式")
  private String settlementMethod;

  /**
   * 预付比例
   */
  @TableField(value = "`advance_ratio`")
  @Schema(title = "预付比例")
  private java.math.BigDecimal advanceRatio;

  /**
   * 结算描述
   */
  @TableField(value = "`settlement_describe`")
  @Schema(title = "结算描述")
  private String settlementDescribe;

  /**
   * 支付方式
   */
  @TableField(value = "`payment_method`")
  @Schema(title = "支付方式")
  private String paymentMethod;

  /**
   * 采购币种
   */
  @TableField(value = "`purchase_currency`")
  @Schema(title = "采购币种")
  private String purchaseCurrency;

  /**
   * 运费
   */
  @TableField(value = "`shipping_price`")
  @Schema(title = "运费")
  private java.math.BigDecimal shippingPrice;

  /**
   * 其他费用
   */
  @TableField(value = "`other_fee`")
  @Schema(title = "其他费用")
  private java.math.BigDecimal otherFee;

  /**
   * 费用分配方式 (0 - 不分配; 1 - 按金额; 2 - 按数量; )
   */
  @TableField(value = "`fee_part_type`")
  @Schema(title = "费用分配方式")
  private String feePartType;

  /**
   * 含税 (0 - 否; 1 - 是; )
   */
  @TableField(value = "`including_tax`")
  @Schema(title = "含税")
  private String includingTax;

  /**
   * 采购员
   */
  @TableField(value = "`opt_uid`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long optUid;

  /**
   * 采购方
   */
  @TableField(value = "`purchaser`")
  @JoinField(Purchaser.class)
  @Schema(title = "采购方")
  private Long purchaser;

  /**
   * 下单时间
   */
  @TableField(value = "`order_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "下单时间")
  private java.util.Date orderTime;

  /**
   * 数量
   */
  @TableField(value = "`quantity`")
  @Schema(title = "数量")
  private String quantity;

  /**
   * 金额
   */
  @TableField(value = "`amount`")
  @Schema(title = "金额")
  private String amount;

  /**
   * 状态 (-1 - 已驳回; 0 -  待审核; 1 - 已处理; )
   */
  @TableField(value = "`status`")
  @Schema(title = "状态")
  private String status;

  /**
   * 采购类型 (0 - 普通采购; )
   */
  @TableField(value = "`purchase_type`")
  @Schema(title = "采购类型")
  private String purchaseType;

  /**
   * 质检类型 (0 - 仓库质检; 1 - 预检; 2 - 免检; )
   */
  @TableField(value = "`inspection_type`")
  @Schema(title = "质检类型")
  private String inspectionType;

  /**
   * 采购单号
   */
  @TableField(value = "`order_sn`")
  @Schema(title = "采购单号")
  private String orderSn;

  /**
   * 结算账期 (0 - 入库后付款; 1 - 入库号一个月付款; )
   */
  @TableField(value = "`closing_period`")
  @Schema(title = "结算账期")
  private String closingPeriod;

  /**
   * 变更单备注
   */
  @TableField(value = "`remarks`")
  @Schema(title = "变更单备注")
  private String remarks;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 运费币种
   */
  @TableField(value = "`shipping_currency`")
  @Schema(title = "运费币种")
  private String shippingCurrency;

  /**
   * 其他费用币种
   */
  @TableField(value = "`other_currency`")
  @Schema(title = "其他费用币种")
  private String otherCurrency;

  /**
   * 汇率
   */
  @TableField(value = "`rate`")
  @Schema(title = "汇率")
  private java.math.BigDecimal rate;

  /**
   * 货币币种
   */
  @TableField(value = "`currency`")
  @JoinField(BdRate.class)
  @Schema(title = "货币币种")
  private Long currency;

  /**
   * 旧金额
   */
  @TableField(value = "`old_amount`")
  @Schema(title = "旧金额")
  private java.math.BigDecimal oldAmount;

  /**
   * 旧数量
   */
  @TableField(value = "`oldquantity`")
  @Schema(title = "旧数量")
  private Integer oldquantity;

  /**
   * 变更创建人
   */
  @TableField(value = "`creator_op`")
  @JoinField(SysUser.class)
  @Schema(title = "变更创建人")
  private Long creatorOp;

  /**
   * 变更创建时间
   */
  @TableField(value = "`creation_time`")
  @Schema(title = "变更创建时间")
  private java.util.Date creationTime;
}
